<?php

function _view_entry(){
	$html_entry = <<<HTML
<div class="entry">                
    <div class="entry-title">%s</div>                
    <div class="clear"></div>
    %s
</div>
HTML;

	$result = mysql_query("SELECT * FROM entry WHERE entry_id = '{$_SESSION['id']}'");
	if (mysql_num_rows($result)){
		$row = mysql_fetch_array($result);
		printf($html_entry,$row['title'],nl2br($row['content']));
	}
}

_view_entry();

?>